package com.baymax.study.base.aop_impl;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

public class AopTestClient {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(ScanConfig.class);
        MyTestService testService = context.getBean(MyTestService.class);
        String result = testService.printTxt();
        System.out.println(result);
    }

    @ComponentScan("com.baymax.study.base.aop_impl")
    @EnableAspectJAutoProxy
    static class ScanConfig {
    }
}
